Info<< "Reading field p\n" << endl;


volScalarField p
(
    IOobject
    (
        "p",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);

Info<< "Reading field U\n" << endl;
volVectorField U
(
    IOobject
    (
        "U",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);

Info<<"Reading fields T_1\n"<<endl;
volScalarField T_1
(
    IOobject
   (
    "T_1",
    runTime.timeName(),
    mesh,
    IOobject::MUST_READ,
    IOobject::AUTO_WRITE
   ),
    mesh
 );

Info<<"Reading fields T_0_71\n"<<endl;
volScalarField T_0_71
(
    IOobject
   (
    "T_0_71",
    runTime.timeName(),
    mesh,
    IOobject::MUST_READ,
    IOobject::AUTO_WRITE
   ),
    mesh
 );

Info<<"Reading fields T_0_25\n"<<endl;
volScalarField T_0_25
(
    IOobject
   (
    "T_0_25",
    runTime.timeName(),
    mesh,
    IOobject::MUST_READ,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields T_0_125\n"<<endl;
volScalarField T_0_125
(
    IOobject
   (
    "T_0_125",
    runTime.timeName(),
    mesh,
    IOobject::MUST_READ,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields T_0_05\n"<<endl;
volScalarField T_0_05
(
    IOobject
   (
    "T_0_05",
    runTime.timeName(),
    mesh,
    IOobject::MUST_READ,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields T_0_025\n"<<endl;
volScalarField T_0_025
(
    IOobject
   (
    "T_0_025",
    runTime.timeName(),
    mesh,
    IOobject::MUST_READ,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields T_0_005\n"<<endl;
volScalarField T_0_005
(
    IOobject
   (
    "T_0_005",
    runTime.timeName(),
    mesh,
    IOobject::MUST_READ,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields T_0_001\n"<<endl;
volScalarField T_0_001
(
    IOobject
   (
    "T_0_001",
    runTime.timeName(),
    mesh,
    IOobject::MUST_READ,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"starting to read tkeFlux variables\n"<<endl;

Info<<"Reading fields tke_Ck\n"<<endl;
volScalarField tke_Ck
(
    IOobject
   (
    "tke_Ck",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields tke_Pk\n"<<endl;
volScalarField tke_Pk
(
    IOobject
   (
    "tke_Pk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );

Info<<"Reading fields tke_Dk\n"<<endl;
volScalarField tke_Dk
(
    IOobject
   (
    "tke_Dk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields tke_Epik\n"<<endl;
volScalarField tke_Epik
(
    IOobject
   (
    "tke_Epik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields tke_Pik\n"<<endl;
volScalarField tke_Pik
(
    IOobject
   (
    "tke_Pik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields tke_Tk\n"<<endl;
volScalarField tke_Tk
(
    IOobject
   (
    "tke_Tk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields tke_Hf_0_001\n"<<endl;
volVectorField tke_Hf_0_001
(
    IOobject
   (
    "tke_Hf_0_001",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields tke_Hf_0_005\n"<<endl;
volVectorField tke_Hf_0_005
(
    IOobject
   (
    "tke_Hf_0_005",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields tke_Hf_0_025\n"<<endl;
volVectorField tke_Hf_0_025
(
    IOobject
   (
    "tke_Hf_0_025",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields tke_Hf_0_05\n"<<endl;
volVectorField tke_Hf_0_05
(
    IOobject
   (
    "tke_Hf_0_05",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields tke_Hf_0_125\n"<<endl;
volVectorField tke_Hf_0_125
(
    IOobject
   (
    "tke_Hf_0_125",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields tke_Hf_0_25\n"<<endl;
volVectorField tke_Hf_0_25
(
    IOobject
   (
    "tke_Hf_0_25",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields tke_Hf_0_71\n"<<endl;
volVectorField tke_Hf_0_71
(
    IOobject
   (
    "tke_Hf_0_71",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields tke_Hf_1\n"<<endl;
volVectorField tke_Hf_1
(
    IOobject
   (
    "tke_Hf_1",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
//2021430 add other budget 
Info<<"starting to read uu_budget variables\n"<<endl;
Info<<"Reading fields uu_Ck\n"<<endl;
volScalarField uu_Ck
(
    IOobject
   (
    "uu_Ck",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields uu_Dk\n"<<endl;
volScalarField uu_Dk
(
    IOobject
   (
    "uu_Dk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields uu_Pk\n"<<endl;
volScalarField uu_Pk
(
    IOobject
   (
    "uu_Pk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );

Info<<"Reading fields uu_Tk\n"<<endl;
volScalarField uu_Tk
(
    IOobject
   (
    "uu_Tk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );

Info<<"Reading fields uu_Pik\n"<<endl;
volScalarField uu_Pik
(
    IOobject
   (
    "uu_Pik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields uu_Epik\n"<<endl;
volScalarField uu_Epik
(
    IOobject
   (
    "uu_Epik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );

Info<<"Reading fields uu_Phik\n"<<endl;
volScalarField uu_Phik
(
    IOobject
   (
    "uu_Phik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );

Info<<"STARTING TO READ vv_budget\n"<<endl;
Info<<"Reading fields vv_Ck\n"<<endl;
volScalarField vv_Ck
(
    IOobject
   (
    "vv_Ck",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields vv_Dk\n"<<endl;
volScalarField vv_Dk
(
    IOobject
   (
    "vv_Dk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );

Info<<"Reading fields vv_Tk\n"<<endl;
volScalarField vv_Tk
(
    IOobject
   (
    "vv_Tk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );

Info<<"Reading fields vv_Pk\n"<<endl;
volScalarField vv_Pk
(
    IOobject
   (
    "vv_Pk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields vv_Pik\n"<<endl;
volScalarField vv_Pik
(
    IOobject
   (
    "vv_Pik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields vv_Epik\n"<<endl;
volScalarField vv_Epik
(
    IOobject
   (
    "vv_Epik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields vv_Phik\n"<<endl;
volScalarField vv_Phik
(
    IOobject
   (
    "vv_Phik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );

Info<<"STARTING TO READ ww_budget\n"<<endl;
Info<<"Reading fields ww_Ck\n"<<endl;
volScalarField ww_Ck
(
    IOobject
   (
    "ww_Ck",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
);
Info<<"Reading fields ww_Pk\n"<<endl;
volScalarField ww_Pk
(
    IOobject
   (
    "ww_Pk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );


Info<<"Reading fields ww_Dk\n"<<endl;
volScalarField ww_Dk
(
    IOobject
   (
    "ww_Dk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields ww_Tk\n"<<endl;
volScalarField ww_Tk
(
    IOobject
   (
    "ww_Tk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields ww_Pik\n"<<endl;
volScalarField ww_Pik
(
    IOobject
   (
    "ww_Pik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields ww_Epik\n"<<endl;
volScalarField ww_Epik
(
    IOobject
   (
    "ww_Epik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields ww_Phik\n"<<endl;
volScalarField ww_Phik
(
    IOobject
   (
    "ww_Phik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"STARTING TO READ uv_budget\n"<<endl;
Info<<"Reading fields uv_Ck\n"<<endl;
volScalarField uv_Ck
(
    IOobject
   (
    "uv_Ck",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields uv_Dk\n"<<endl;
volScalarField uv_Dk
(
    IOobject
   (
    "uv_Dk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields uv_Pk\n"<<endl;
volScalarField uv_Pk
(
    IOobject
   (
    "uv_Pk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields uv_Pik\n"<<endl;
volScalarField uv_Pik
(
    IOobject
   (
    "uv_Pik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields uv_Tk\n"<<endl;
volScalarField uv_Tk
(
    IOobject
   (
    "uv_Tk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields uv_Epik\n"<<endl;
volScalarField uv_Epik
(
    IOobject
   (
    "uv_Epik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields uv_Phik\n"<<endl;
volScalarField uv_Phik
(
    IOobject
   (
    "uv_Phik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"STARTING TO READ s_uubudget\n"<<endl;


Info<<"Reading fields s_uu_Dk_1\n"<<endl;
volScalarField s_uu_Dk_1
(
    IOobject
   (
    "s_uu_Dk_1",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields s_uu_Dk_2\n"<<endl;
volScalarField s_uu_Dk_2
(
    IOobject
   (
    "s_uu_Dk_2",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
 Info<<"Reading fields s_uu_Dk_3\n"<<endl;
volScalarField s_uu_Dk_3
(
    IOobject
   (
    "s_uu_Dk_3",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );

 Info<<"Reading fields s_uu_Dk_4\n"<<endl;
volScalarField s_uu_Dk_4
(
    IOobject
   (
    "s_uu_Dk_4",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );


 
Info<<"Reading fields s_uu_Pk\n"<<endl;
volScalarField s_uu_Pk
(
    IOobject
   (
    "s_uu_Pk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields s_uu_Pik\n"<<endl;
volScalarField s_uu_Pik
(
    IOobject
   (
    "s_uu_Pik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
Info<<"Reading fields s_uu_Epik\n"<<endl;
volScalarField s_uu_Epik
(
    IOobject
   (
    "s_uu_Epik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );

Info<<"STARTING TO READ ss_T_1budget\n"<<endl;
Info<<"Reading fields ss_T_1_Dk_1\n"<<endl;
volScalarField ss_T_1_Dk_1
(
    IOobject
   (
    "ss_T_1_Dk_1",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
Info<<"Reading fields ss_T_1_Dk_2\n"<<endl;
volScalarField ss_T_1_Dk_2
(
    IOobject
   (
    "ss_T_1_Dk_2",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );

Info<<"Reading fields ss_T_1_Pk\n"<<endl;
volScalarField ss_T_1_Pk
(
    IOobject
   (
    "ss_T_1_Pk",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );

Info<<"Reading fields ss_T_1_Epik\n"<<endl;
volScalarField ss_T_1_Epik
(
    IOobject
   (
    "ss_T_1_Epik",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
//add t't'2021 6.13

Info<<"Reading fields tt_Pn_0_001\n"<<endl;
volScalarField tt_Pn_0_001
(
    IOobject
   (
    "tt_Pn_0_001",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
 Info<<"Reading fields tt_Pn_0_005\n"<<endl;
volScalarField tt_Pn_0_005
(
    IOobject
   (
    "tt_Pn_0_005",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
  Info<<"Reading fields tt_Pn_0_025\n"<<endl;
volScalarField tt_Pn_0_025
(
    IOobject
   (
    "tt_Pn_0_025",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
  Info<<"Reading fields tt_Pn_0_05\n"<<endl;
volScalarField tt_Pn_0_05
(
    IOobject
   (
    "tt_Pn_0_05",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
   Info<<"Reading fields tt_Pn_0_125\n"<<endl;
volScalarField tt_Pn_0_125
(
    IOobject
   (
    "tt_Pn_0_125",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
    Info<<"Reading fields tt_Pn_0_25\n"<<endl;
volScalarField tt_Pn_0_25
(
    IOobject
   (
    "tt_Pn_0_25",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
    Info<<"Reading fields tt_Pn_0_71\n"<<endl;
volScalarField tt_Pn_0_71
(
    IOobject
   (
    "tt_Pn_0_71",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
     Info<<"Reading fields tt_Pn_1\n"<<endl;
volScalarField tt_Pn_1
(
    IOobject
   (
    "tt_Pn_1",
    runTime.timeName(),
    mesh,
    IOobject::READ_IF_PRESENT,
    IOobject::AUTO_WRITE
   ),
    mesh
 );
 
//*****************************ADD
Info<< "Reading transportProperties\n" << endl;

IOdictionary transportProperties
(
    IOobject
    (
        "transportProperties",
        runTime.constant(),
        mesh,
        IOobject::MUST_READ_IF_MODIFIED,
        IOobject::NO_WRITE
    )
);

/*
dimensionedScalar DT
(
 "DT",
 transportProperties.lookup("DT")
 );
//
*/


//**********************************
#include "createPhi.H"
dimensionedScalar nu
(
    "nu",
    dimViscosity,
    transportProperties.lookup("nu")
);
dimensionedScalar Pr_0_001 (transportProperties.lookup("Pr_0_001"));
dimensionedScalar Pr_0_005 (transportProperties.lookup("Pr_0_005"));
dimensionedScalar Pr_0_025 (transportProperties.lookup("Pr_0_025"));
dimensionedScalar Pr_0_05 (transportProperties.lookup("Pr_0_05"));
dimensionedScalar Pr_0_125 (transportProperties.lookup("Pr_0_125"));
dimensionedScalar Pr_0_25 (transportProperties.lookup("Pr_0_25"));
dimensionedScalar Pr_0_71 (transportProperties.lookup("Pr_0_71"));
dimensionedScalar Pr_1 (transportProperties.lookup("Pr_1"));
dimensionedScalar gamma_0_001 (transportProperties.lookup("gamma_0_001"));
dimensionedScalar gamma_0_005 (transportProperties.lookup("gamma_0_005"));
dimensionedScalar gamma_0_025 (transportProperties.lookup("gamma_0_025"));
dimensionedScalar gamma_0_05 (transportProperties.lookup("gamma_0_05"));
dimensionedScalar gamma_0_125 (transportProperties.lookup("gamma_0_125"));
dimensionedScalar gamma_0_25 (transportProperties.lookup("gamma_0_25"));
dimensionedScalar gamma_0_71 (transportProperties.lookup("gamma_0_71"));
dimensionedScalar gamma_1 (transportProperties.lookup("gamma_1"));


label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, piso.dict(), pRefCell, pRefValue);
mesh.setFluxRequired(p.name());


singlePhaseTransportModel laminarTransport(U, phi);

autoPtr<incompressible::turbulenceModel> turbulence
(
    incompressible::turbulenceModel::New(U, phi, laminarTransport)
);

#include "createMRF.H"
#include "createFvOptions.H"
